package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class ActionList implements ObjectPrivileges {

    private int beginIndex;
    private int endIndex;
    private List<Action> actionList;

    public ActionList(List<Action> actionList) {
        this.beginIndex = actionList.get(0).getBeginIndex();
        this.endIndex = actionList.get(actionList.size() - 1).getEndIndex();
        this.actionList = actionList;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return actionList.size();
    }

    public Action get(int index) {
        return actionList.get(index);
    }

}
